<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <div>
        <p>是否同意勾选：{{isFlag}}</p>
        <p>爱好：{{hobby}}</p>
        <ul>
            <li><input type="checkbox" v-model="isFlag"></li>
            <li>
                <input type="checkbox" value="喝酒" v-model="hobby">喝酒
                <input type="checkbox" value="抽烟" v-model="hobby">抽烟
                <input type="checkbox" value="打架" v-model="hobby">打架
            </li>
        </ul>
    </div>
</div>
<script src="../../JavaScript/vue.js"></script>
<script>
    const app = Vue.createApp({
        data() {
            return {
               isFlag:true,
                hobby:[],
            }
        },
    })
    app.mount("#app")
</script>
</body>
</html>